import java.net.InetAddress;
import java.net.UnknownHostException;

import javax.swing.JFrame;


/**
 *  Main Class
 */

public class Main extends JFrame
{
	public Main() {
	}
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	static public String myIP=new String();
	/** holds the server's IP */
	static public String serverIP=new String();
	/** holds the database information */
	static public String[] sets={"jdbc:mysql://localhost/goodreading","root","Braude","d:\\Files"};
	/** static login window */
	public static LoginWindow log =new LoginWindow();
	/** static user class */
	public static User gusers;
	/** static main screen class */
	public static MainScreen welcomeScreen;
	/** static book Management Gui class */
	public static BookManagementGui bookManagement = new BookManagementGui();
	/** static book Management Control class */
	public static BookManagementControl bookManagementCTRL = new BookManagementControl();
	/** static Review Management Control class */
	public static ReviewManagementCTRL revManagementCTRL = new ReviewManagementCTRL();
	/** static Update Book's Subject Gui class */
	public static UpdateBookSubject UpdBooksSubjectGui;
	/** static Update Book's Subject Control class */
	public static UpdateBookSubjectCTRL UpdBooksSubjectCTRL;
	
	/** static ReviewManagement class */
	public static ReviewManagement reviewManagement;
	/** static CartGui class */
	public static CartGui cartgui;
	/** static CartControl class */
	public static CartControl cart = new CartControl();
	/** static CreditCardEntity class */
	public static CreditCardEntity creditInfo=new CreditCardEntity();
	/** static CreditCardControl class */
	public static CreditCardControl creditCardControl=new CreditCardControl();
	/** static AddReviewGui class */
	public static AddReviewGui addReviewGui;
	/** static AddReview class */
	public static AddReview addReview=new AddReview();
	/** static MyBooksControl class */
	public static MyBooksControl myBooksControl;
	/** static MyBooksGui class */
	public static MyBooksGui myBooksGui;
	/** holds frame size */
	public static int[] size=new int[2];
	/** static search book control class */
	public static SearchBookCONTROL searchBookC;
	/** static search book Gui class */
	public static SearchBookGUI searchBookG;
	/** static Update book Gui class */
	public static UpDateBookGui upDateBookG;
	/** static Update book control class */
	public  static UpDateBookControl upDateBookC;
	/** static Add new book Gui class */
	public  static AddNewBookGui addNBookG;
	/** static Add new book control class */
	public  static AddNewBookControl addNBookC;
	/** static Remove book from catalog control class */
	public  static RemoveBFCControl removeFromCC;
	/** static Remove book from catalog Gui class */
	public  static RemoveBFCGui removeFromCG;
	/** static search review Gui class */
	public  static SearchReviewG searchReviewG;
	/** static search review control class */
	public  static SearchReviewC searchReviewC;
	/** static Restore book Gui class */
	public  static RestoreBookG restoreBG;
	/** static Restore book control class */
	public  static RestoreBookC restoreBC;
	/** static Personal Data Managment control class */ 
	public static PersonalDataManagmentCONTROL pdmc;
	/** static Reader Report control class */
	public static ReaderReportCONTROL rrc; 
	/** static Book Report control class */
	public static BookReportControl brc= new BookReportControl(false);
	
		
	public static void main(String[] args)
	{
		try {
			myIP=(InetAddress.getLocalHost().getHostAddress());
			if(args.length>0)
				serverIP=args[0];
			else
				serverIP="localhost";
			} catch (UnknownHostException e) {
				
			e.printStackTrace();
		}
		log.frame.setVisible(true);
	}

}
